<?php
class FormatUtil{
	public static function formatFloat($num, $char = " "){
		if(!isset($num) || count($num)== 0) return 0;
		$length = strlen($num);
		$result = "";
		$j = 0;
		for ($i = $length - 1; $i >= 0; $i--) {
			if($j != 0 && $j%3 == 0)
				$result .= $char.$num[$i];
			else 
				$result .= $num[$i];
			$j++; 
		}
		return strrev($result);
	}
}